# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=py3-pytest-runner
pkgver=6.0.1
pkgrel=1
pkgdesc="Invoke py.test as distutils command"
url="https://github.com/pytest-dev/pytest-runner"
arch="noarch"
license="MIT"
depends="python3 py3-pytest py3-setuptools"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-runner/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/pytest-runner-$pkgver"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 tests/test_ptr.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/pytest_runner*.whl
}

sha512sums="
4816954facf84015a2aa4c26e9f7c8e9de25f87d1320a9636a544c86b0be7d7da0f1336f4a4972c56643e1f13a92b2ee378a36ced7169a4ea64a32daa8c60618  py3-pytest-runner-6.0.1.tar.gz
"
